package com.example.librarymanagement.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.librarymanagement.dto.type.TypeListDto;
import com.example.librarymanagement.entity.Type;
import com.example.librarymanagement.vo.TypeVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author lzx
 */
@Repository
public interface TypeMapper extends BaseMapper<Type> {

    /**
     * 根据名称模糊查询或分页查询（无参为分页查询）
     *
     * @param page        分页对象
     * @param typeListDto TypeListDto对象
     * @return TypeVo分页对象
     */
    IPage<TypeVo> getBookType(IPage<TypeVo> page, @Param("search") TypeListDto typeListDto);

}
